<template>
  <div>
    <h1>Father</h1>
    父亲:{{ car }}
    <div>接受儿子传过来的参数：{{ toy }}</div>
    <Childer :car="car" :sendToy="getToy" />
  </div>
</template>

<script setup lang="ts">
import Childer from "./Childer.vue";
import { ref } from "vue";
let car = ref("BMW");
let toy = ref("");
function getToy(value: string) {
  console.log("父亲给儿子传递的玩具：", value);
  toy.value = value;
}
</script>

<style lang="scss" scoped></style>
